package com.chzc.fm.duotin.bean.mine;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by BillSinla on 2016/6/29.
 */
public class UserCenter {

    /**
     * subscribe : {"update_num":0,"num":5}
     * follow : {"update_num":0,"num":8}
     * like : {"update_num":0,"num":4}
     * notify : {"update_num":0,"num":1000}
     */

    private MessageBean message;
    /**
     * real_name : Bill Sinla
     * image_url : http://c3.duotin.com/i1/DT/eL2YahVXhyJGV3azVD_yzaBDUTpmTLBCbywj0KuA_dk.jpg
     */

    private UserBean user;

    public static UserCenter objectFromData(String str) {

        return new Gson().fromJson(str, UserCenter.class);
    }

    public static List<UserCenter> arrayUserCenterFromData(String str) {

        Type listType = new TypeToken<ArrayList<UserCenter>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public MessageBean getMessage() {
        return message;
    }

    public void setMessage(MessageBean message) {
        this.message = message;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public static class MessageBean {
        /**
         * update_num : 0
         * num : 5
         */

        private SubscribeBean subscribe;
        /**
         * update_num : 0
         * num : 8
         */

        private FollowBean follow;
        /**
         * update_num : 0
         * num : 4
         */

        private LikeBean like;
        /**
         * update_num : 0
         * num : 1000
         */

        private NotifyBean notify;

        public static MessageBean objectFromData(String str) {

            return new Gson().fromJson(str, MessageBean.class);
        }

        public static List<MessageBean> arrayMessageBeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<MessageBean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public SubscribeBean getSubscribe() {
            return subscribe;
        }

        public void setSubscribe(SubscribeBean subscribe) {
            this.subscribe = subscribe;
        }

        public FollowBean getFollow() {
            return follow;
        }

        public void setFollow(FollowBean follow) {
            this.follow = follow;
        }

        public LikeBean getLike() {
            return like;
        }

        public void setLike(LikeBean like) {
            this.like = like;
        }

        public NotifyBean getNotify() {
            return notify;
        }

        public void setNotify(NotifyBean notify) {
            this.notify = notify;
        }

        public static class SubscribeBean {
            private int update_num;
            private int num;

            public static SubscribeBean objectFromData(String str) {

                return new Gson().fromJson(str, SubscribeBean.class);
            }

            public static List<SubscribeBean> arraySubscribeBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<SubscribeBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public int getUpdate_num() {
                return update_num;
            }

            public void setUpdate_num(int update_num) {
                this.update_num = update_num;
            }

            public int getNum() {
                return num;
            }

            public void setNum(int num) {
                this.num = num;
            }
        }

        public static class FollowBean {
            private int update_num;
            private int num;

            public static FollowBean objectFromData(String str) {

                return new Gson().fromJson(str, FollowBean.class);
            }

            public static List<FollowBean> arrayFollowBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<FollowBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public int getUpdate_num() {
                return update_num;
            }

            public void setUpdate_num(int update_num) {
                this.update_num = update_num;
            }

            public int getNum() {
                return num;
            }

            public void setNum(int num) {
                this.num = num;
            }
        }

        public static class LikeBean {
            private int update_num;
            private int num;

            public static LikeBean objectFromData(String str) {

                return new Gson().fromJson(str, LikeBean.class);
            }

            public static List<LikeBean> arrayLikeBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<LikeBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public int getUpdate_num() {
                return update_num;
            }

            public void setUpdate_num(int update_num) {
                this.update_num = update_num;
            }

            public int getNum() {
                return num;
            }

            public void setNum(int num) {
                this.num = num;
            }
        }

        public static class NotifyBean {
            private int update_num;
            private int num;

            public static NotifyBean objectFromData(String str) {

                return new Gson().fromJson(str, NotifyBean.class);
            }

            public static List<NotifyBean> arrayNotifyBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<NotifyBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public int getUpdate_num() {
                return update_num;
            }

            public void setUpdate_num(int update_num) {
                this.update_num = update_num;
            }

            public int getNum() {
                return num;
            }

            public void setNum(int num) {
                this.num = num;
            }
        }
    }

    public static class UserBean {
        private String real_name;
        private String image_url;

        public static UserBean objectFromData(String str) {

            return new Gson().fromJson(str, UserBean.class);
        }

        public static List<UserBean> arrayUserBeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<UserBean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public String getReal_name() {
            return real_name;
        }

        public void setReal_name(String real_name) {
            this.real_name = real_name;
        }

        public String getImage_url() {
            return image_url;
        }

        public void setImage_url(String image_url) {
            this.image_url = image_url;
        }
    }
}